<?php
 class PublicController extends AdminController { public function init() { C('LAYOUT', false); $this->session->start(); } public function loginAction() { $zym_10=M('user')->find(); if (IS_POST) { $zym_9 = I('post.username', 'str', ''); $zym_6 = I('post.password', 'str', ''); $zym_5 = I('post.verifycode'); if ($zym_5 == $_SESSION['verify']) { if ($zym_8 = M('user')->checkInfo($zym_9, $zym_6)) { $_SESSION['verify']=null; $zym_7=$zym_8['id']; if (M('admin_user')->checkUserStatus($zym_7)) { M('admin_user')->setLoginStatus($zym_7); $this->success('登录成功',U('admin.index.index')); } else { $this->error('您没有权限进入后台！'); } } else { $this->error('帐号和密码输入错误'); } } else { $this->error('验证码输入错误'); } } $this->display(); } public function logoutAction() { M('admin_user')->delLoginStatus(); $this->success('已经成功退出系统',U('Admin.Index.index')); } public function verifyAction() { verify::buildImageVerify(6, 1, 'png', 70, 30); } }
?>